#!/bin/sh
# hockeyfamily737
# Last edited 2013/06/02
########## System Variables ############################
VERSION=0.0.1
TIMESTAMP=`date +"%m_%d_%Y@%I_%M_%p"`            
USERNAME=hockeyfamily737@gmail.com
ulb=/usr/local/bin
#
########## HTC ONE LOCAL DIRECTORIES ############
htcONE=~/d3rp/Roms/ONE
#
# d3rpONE
d3rpONE=~/d3rp/Roms/ONE/d3rpONE
trunk_one=~/d3rp/Roms/ONE/d3rpONE/trunk
tsystem=~/d3rp/Roms/ONE/d3rpONE/trunk/system
buildprop=~/d3rp/Roms/ONE/d3rpONE/trunk/system/build.prop
working_one=~/d3rp/Roms/ONE/d3rpONE/working-folder
#
#bareback
bareONE=~/d3rp/Roms/ONE/d3rpONE-bareback
working_bare=~/d3rp/Roms/ONE/d3rpONE-bareback/working-folder
bare_system=~/d3rp/Roms/ONE/d3rpONE-bareback/working-folder/system
bare_data=~/d3rp/Roms/ONE/d3rpONE-bareback/working-folder/data/data/bareback_files
ddata=~/d3rp/Roms/ONE/d3rpONE-bareback/working-folder/data/data
########## HTC ONE REMOTE REPOSITORIES ##########
svnd3rpone=https://d3rp-one.googlecode.com/svn/trunk/
TRUNKDIR=http://d3rp-one.googlecode.com/svn/trunk/
#################################################
echo "This script will set up your d3rp kitchen."
echo "If you don't wish to continue,"
echo "press Ctrl and c to stop the script."
sleep 10
clear
#
echo "Setting up d3rp directories."
mkdir ~/d3rp
mkdir ~/d3rp/Themes
mkdir ~/d3rp/Roms
mkdir ~/d3rp/Working
mkdir ~/d3rp/Roms/Shooter
mkdir ~/d3rp/Roms/Shooter/Bareback
mkdir ~/d3rp/Roms/Shooter/Drama
mkdir ~/d3rp/Roms/Shooter/inbREDed
mkdir ~/d3rp/Roms/Shooter/LightsOut
mkdir ~/d3rp/Roms/Jewel
mkdir ~/d3rp/Roms/Jewel/SuperJelly
mkdir ~/d3rp/Roms/Jewel/SuperLTE
mkdir ~/d3rp/Roms/S3/Drama
mkdir ~/d3rp/Roms/S3/Bareback
mkdir ~/d3rp/Roms/ONE
mkdir ~/d3rp/Roms/ONE/d3rpONE
echo "d3rp directories have beeen established."
sleep 5
clear
#
echo "Preparing to install d3rp binary files."
echo "You will be prompted for your root password."
echo "Installing d3rp binary files and scripts."
sudo cp -r usr/* /usr
sudo cp -r etc/* /etc
echo "d3rp binary files and scripts have been installed." 
sleep 10
clear
#
echo "Setting permissions."
sudo chmod a+r /etc/udev/rules.d/99-android.rules
sudo service udev restart
sudo chmod 755 $ulb/aapt
sudo chmod 755 $ulb/apktool
sudo chmod 755 $ulb/apktool.jar
sudo chmod 755 $ulb/au.installer
sudo chmod 755 $ulb/bare-shooter
sudo chmod 755 $ulb/bare-one
sudo chmod 755 $ulb/d2spr
sudo chmod 755 $ulb/d3rp-amend
sudo chmod 755 $ulb/d3rp-kitchen
sudo chmod 755 $ulb/d3rp-one
sudo chmod 755 $ulb/drama-shooter
sudo chmod 755 $ulb/dsixda
sudo chmod 755 $ulb/inbreded-shooter
sudo chmod 755 $ulb/jewel
sudo chmod 755 $ulb/lightsout-shooter
sudo chmod 755 $ulb/main
sudo chmod 755 $ulb/one
sudo chmod 755 $ulb/rom
sudo chmod 755 $ulb/shooter
sudo chmod 755 $ulb/super-jelly
sudo chmod 755 $ulb/super-lte
sudo chmod 755 $ulb/theme
sudo chmod 755 $ulb/update-d3rp-kitchen
echo "d3rp permissions have been set."
sleep 10
clear
#
echo "Updating Linux repositories."
sleep 10
sudo apt-get update
sleep 10
clear
#
echo "Upgrading installed Linux packages."
echo "During this process you will be prompted,"
echo "for input, if updates are available."
echo "If you are unsure of whether you should update something,"
echo "Error on the side of caution."
sleep 10
sudo apt-get upgrade
sleep 10
clear
#
echo "Installing Android Utility and dsixda's kitchen."
au.installer
clear
echo "Android Utility and dsixda's kitchen have been installed."
echo "Credits to:"
echo " "
echo "     Dsixda: for his amazing Android kitchen."
echo "and"
echo "     Tommy Tomato: for his Android Utility and awsome Script-Fu"
sleep 10
clear
#
echo "Installing Subversion"
sudo apt-get install subversion
clear
echo "Subversion has been installed"
sleep 5
clear
#
echo "Installing 32-bit libraries"
sudo apt-get install ia32-libs-multiarch
clear
echo "32-bit libraries have been installed"
sleep 5
clear
#
echo "Installing Meld"
sudo apt-get install meld
clear
echo "Meld has been installed"
sleep 5
clear
#
echo "Thanks for choosing Team d3rp."
echo " "
sleep 2
echo "To start the d3rp kitchen, open a terminal,"
echo "And type [d3rp-kitchen]."
echo " "
sleep 2
echo "To start Android Utility or dsixda's kitchen,"
echo "Open a terminal and type either [au] or [andutil]."
echo " "
sleep 2
echo "Please restart your machine,"
echo "Before using these tools."
#



